﻿var dic = { "localhost": "http://localhost:8206", "192.168": "http://192.168.1.18:9000", "other": "http://webapi.wangshuyu.top" }; 

var domain = window.document.domain;
var HttpWcf = dic["other"];
for (var key in dic) {
    if (domain.indexOf(key) > -1) {
        HttpWcf = dic[key];
    }
}
//console.log("HttpWcf=" + HttpWcf);